package br.com.knowledge.persistence.hibernate.entities;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * FntFuncaoglobal entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "fnt_funcaoglobal", schema = "public")
public class FntFuncaoglobal implements java.io.Serializable {

	// Fields

	private Integer id;
	private FntFonte fntFonte;
	private String nomefuncaoglobal;
	private Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals = new HashSet<FntMetodofuncaoglobal>(
			0);
	private Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals_1 = new HashSet<FntMetodofuncaoglobal>(
			0);

	// Constructors

	/** default constructor */
	public FntFuncaoglobal() {
	}

	/** minimal constructor */
	public FntFuncaoglobal(FntFonte fntFonte, String nomefuncaoglobal) {
		this.fntFonte = fntFonte;
		this.nomefuncaoglobal = nomefuncaoglobal;
	}

	/** full constructor */
	public FntFuncaoglobal(FntFonte fntFonte, String nomefuncaoglobal,
			Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals,
			Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals_1) {
		this.fntFonte = fntFonte;
		this.nomefuncaoglobal = nomefuncaoglobal;
		this.fntMetodofuncaoglobals = fntMetodofuncaoglobals;
		this.fntMetodofuncaoglobals_1 = fntMetodofuncaoglobals_1;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "fnt_fonte_id", nullable = false)
	public FntFonte getFntFonte() {
		return this.fntFonte;
	}

	public void setFntFonte(FntFonte fntFonte) {
		this.fntFonte = fntFonte;
	}

	@Column(name = "nomefuncaoglobal", nullable = false, length = 256)
	public String getNomefuncaoglobal() {
		return this.nomefuncaoglobal;
	}

	public void setNomefuncaoglobal(String nomefuncaoglobal) {
		this.nomefuncaoglobal = nomefuncaoglobal;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fntFuncaoglobal")
	public Set<FntMetodofuncaoglobal> getFntMetodofuncaoglobals() {
		return this.fntMetodofuncaoglobals;
	}

	public void setFntMetodofuncaoglobals(
			Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals) {
		this.fntMetodofuncaoglobals = fntMetodofuncaoglobals;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fntFuncaoglobal")
	public Set<FntMetodofuncaoglobal> getFntMetodofuncaoglobals_1() {
		return this.fntMetodofuncaoglobals_1;
	}

	public void setFntMetodofuncaoglobals_1(
			Set<FntMetodofuncaoglobal> fntMetodofuncaoglobals_1) {
		this.fntMetodofuncaoglobals_1 = fntMetodofuncaoglobals_1;
	}

}